1. Field of the Invention
The present invention relates to a portable electronic device, which is provided with, for example, a communication interface and performs processing in response to a command transmitted from external equipment, and a data control method.
2. Description of the Related Art
In general, an IC card as a portable electronic device is configured so that an IC chip is embedded in a card-shaped housing of a plastic material or the like. The IC card of this type includes a nonvolatile memory, such as an electrically erasable programmable read-only memory (EEPROM) or a flash ROM, which can maintain data without requiring power supply. This IC card records various data to the nonvolatile memory. In recent years, a technique has been developed to reduce the size of nonvolatile memories, so that the IC card can be provided with a large-capacity nonvolatile memory. Thus, the IC card can handle a large amount of data, so that it is widely noticed as a next-generation card.
Further, there is an IC card in which an antenna is embedded in its main body and which can transmit and receive data to and from a card reader/writer through wireless communication. This IC card can read and write data by wireless communication.
Furthermore, there is a portable electronic device such as an IC book in which an IC sheet that includes an IC chip and an antenna or a contact terminal is bound to enable wireless or contact communication with a card reader/writer.
Proposed in Jpn. Pat. Appln. KOKAI Publication No. 2003-006578 is an admission and departure control system that performs access control or entry control, including control of admission and departure times, based on the use of the portable electronic devices described above. According to this system, a card reader/writer is installed in a doorway, and the portable electronic devices are expected to be held over the card reader/writer.
In some portable electronic devices used in the conventional admission and departure control system described above, successive pieces of admission and departure information are stored into an IC. In this conventional admission and departure control system, however, admission or departure information is simply additionally recorded to the IC without reference to already written information at the time of admission or departure. In this case, there is a problem, for example, that past wrongful admission or departure using the portable electronic devices, if any, cannot be detected. There are some modern passports in which an IC chip and an antenna are embedded. If any immigration entry or exit information is simply additionally recorded to one such passport, for example, wrongful entry or exit may possibly be overlooked.